<?php
//var_dump(@mkdir("a"));
//var_dump(@mkdir("a/b/c/d",0777,true));//递归创建目录

$dirs=array(
    "a",
    "b",
    "c",
    "d"
);
foreach ($dirs as $d){
    if(is_dir($d))continue;//先判断目录是否存在
    mkdir($d) or exit("创建{$d}目录失败");//创建成功或者失败
}

?>
